#include "stdio.h"
#include "TGraph.h"
#include "FloydAlgSeq.h"

void printMatrix (int * a, int n)
{
	for (int i=0; i<n; i++)
	{
		for (int j=0; j<n; j++)
			printf("%i ", a[i*n+j]);
		printf("\n");
	}
}

int main()
{
	TGraph a;
	//a.readFromAdjMatrix("G:\\graph1.txt");
	a.readFromEdgeList("G:\\geneways.txt", 50);
	int *d;
	d = new int[a.N()*a.N()];
	a.fillAdjMatrix(d);
	floydSequential(a.N(),d);
	printMatrix(d,a.N());
	delete[] d;

	return 0;
}